@extends('host.custom.common.common')

@section('c-head')
    <script>

        PAGE_DATA = {
            pagingObj: {
                total: 0,
                pageSize: 8,
                page: 1
            },
            classifyData: $.parseJSON('{!! json_encode($categories) !!}'),
            stateData: [
                {code: '1', text: '供采分销'},
                {code: '2', text: '自由集散'},
                {code: '3', text: '上架'},
                {code: '4', text: '下架'},
                {code: '5', text: '推荐'},
                {code: '6', text: '禁售'}
            ],
            newGoodUrl: "{{ route('account.goods.create') }}"

        };
    </script>
    <style>
        div[id='content:del-good-dialog'] {
            color: red;
            font-size: 25px;
        }

    </style>
    @stop

    @section('body')
            <!-- top_test -->
    <div id="top_test"></div>
    <!-- web_logo_search -->
    <div id="web_logo_search"></div>
    <!-- comm_nav -->
    <div id="comm_nav"></div>
    <div class="com-w mt20">
        <div class="wrapper clearfix">
            <div class="w220 mr20 comm-left-menu">
                <div class="menu-top-title">
                    供应商中心
                </div>
                <div id="leftmenuitems">
                </div>
            </div>

            <div id="main-context" class="w960 comm-main">
                <div class="main-release clearfix">
                    <div class="main-release-nav">
                        您当前的位置：首页 &gt; 供应商中心
                    </div>
                    <div class="main-release-title">
                        <span class="icons"></span>
                        <span class="release-title-h3 f16">商品管理</span>
                    </div>
                    <div class="main-release-from">
                        <div class="h60 w960">
                            <div class="admin-shop f14 S16">
                                <a class="btn btn-default btn-w100x32" id="new-good"> 新增商品 </a>
         <span class="shop-select">
			<select class="w140x32" id="goods-classify"> <option value="">本店分类</option> </select>
		 </span>
         <span class="shop-select1">
			<select class="w140x32" id="goods-state"> <option value="">状态</option>  </select>
		 </span>
                                <span class="shop-input"> <input id="good-name" type="text" class="w220x32" placeholder="请输入商品名" /> </span>
                                <div id="search-btn" class="btn btn-warn btn-w70x32" style="margin-top: 5px;"> 搜索 </div>
                            </div>
                        </div>
                        <div class="comm-tbl shop-admin-1">
                            <div class="head">
                                <ul class="clearfix">
                                    <li class="w30" style="line-height: 0px;"><input id="sel-all-chk" type="checkbox" style="margin-top: 10px;" /></li>
                                    <li class="w80"><label id="sel-all" for="sel-all-chk" class="check-all">全选</label><span id="del-all" class="delect">删除</span></li>
                                    <li class="w160">商品</li>
                                    <li class="w80">分类</li>
                                    <li class="w80">价格</li>
                                    <li class="w100">库存</li>
                                    <li class="w60">授权</li>
                                    <li class="w60">上架</li>
                                    <li class="w60">推荐</li>
                                    <li class="w60">禁售</li>
                                    <li class="w160">操作</li>
                                </ul>
                            </div>
                            <div id="commTabs_2_body" class="body clearfix"> </div>
                        </div>
                    </div>

                    <div id="comm-paging" class="comm-paging" style="float: right;"></div>

                </div>
            </div>

        </div>
    </div>
    <!-- foot_nav -->
    <div id="foot_nav"></div>
    <div id="bottom_main"></div>

    <!-- 确认框 -->
    <script type="text/template" id="del-confirm">
        <div class="dialog-div">
            <div style="color:red;">确认删除所选数据?</div>
            <div class="price-game-btn">
                <span class="btn btn-gray btn-w140x40 remove" id="cancel-btn">取消</span>
                <span class="btn btn-warn btn-w140x40" id="ok-btn">确定</span>
            </div>
        </div>
    </script>

    <script type="text/template" id="good-list-templ">
        <%_.each(obj, function(item){%>
        <ul class="clearfix shop-a-main" id="good_<%=item.id%>">
            <li class="w30 ">
                <label for="sel_<%=item.id%>" class="sel-check-box">
                    <input id="sel_<%=item.id%>" type="checkbox" class="shop-a-checkbox" goodid="<%=item.id%>" ></li>
            </label>
            <li class="w80">
            <span class="shop-imge">
                <img src="<%=item.img%>">
            </span>
            </li>
            <li class="w160">
            <span style="margin-top: 26px;text-align: left;font-size: 14px;color: #c38451 ">
                <%=item.name%>
            </span>
            </li>
            <li class="w80">
            <span class="classify">
                <%=item.classify%>
            </span>
            </li>
            <li class="w80">
                <div class="price" style="line-height:60px;">￥<%=item.price%></div>
            </li>
            <li class="w100">
                <span class="stock"><%=item.stock%></span>
            </li>
            <li class="w60">
                <!-- 授权 -->
                <div class="<%= (!!item.authority)? "i-check-no" : "i-check-yes"%> ml20 mt30"></div>
            </li>
            <li class="w60">
                <span class="<%= (!!item.stacking)? "i-check-no" : "i-check-yes"%> ml20 mt30"></span>
            </li>
            <li class="w60">
                <span class="<%= (!!item.recommend)? "i-check-no" : "i-check-yes"%> ml20 mt30"></span>
            </li>
            <li class="w60">
                <span class="<%= (!!item.lock)? "unlock-sale" : "lock-sale"%> ml20 mt30"></span>
            </li>
            <li class="w160" data-id="<%=item.id%>">
                <a class="btn btn-default btn-w70x30 edit-item" href="<%=item.edit_url%>">编辑</a>
                <span class="btn btn-important btn-w70x30 delete-item">删除</span>
            </li>
        </ul>
        <%});%>
    </script>

    <!-- JS -->
    <script src="/assets/b2b/js/libs/jquery.paging.min.js"></script>
    <script src="/assets/b2b/js/libs/dialog-min.js"></script>
    <script src="/assets/b2b/js/pageModules/supplyer/S16.js"></script>
@stop